var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get("/gameh5/guess/get7daysMatchs",function(req,res,next){

  var type = req.query.pageIndex || 0; //1.  英雄联盟, 2. dota2, 3.s炉石传说.   ? id.
  if(type ==0) {
      res.json(
          {"code":200,"data":{"dataList":[{"bMatchId":5366,"bMatchName":"2017LCK春季赛","teamA":"MVP","teamB":"KDM","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-09","time":"16:00","week":"星期四","matchTypeName":"2017LCK春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJfaANFvdAAAw8eQfAws008.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0B/ChFGQ1h8ZLiAWMEYAAAkhKDDGv8680.png"},{"bMatchId":5325,"bMatchName":"2017LPL春季赛","teamA":"IM","teamB":"SS","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-09","time":"17:00","week":"星期四","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/02/ChFGUlexh1SAK36_AAAg7UAxpoE421.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/09/ChFGQ1hy-aqAesE9AACMs5ClYik056.png"},{"bMatchId":5365,"bMatchName":"2017LPL春季赛","teamA":"EDG","teamB":"GT","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-10","time":"17:00","week":"星期五","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4P5eAT3N8AABnoopFvhE024.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/Cj2sUld145iAemZ1AACG5iQNKGE975.png"},{"bMatchId":5380,"bMatchName":"2017LPL春季赛","teamA":"RNG","teamB":"SS","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-11","time":"13:00","week":"星期六","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4OQmAHfvsAAATQgJwbYM768.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/09/ChFGQ1hy-aqAesE9AACMs5ClYik056.png"},{"bMatchId":5381,"bMatchName":"2017LPL春季赛","teamA":"IM","teamB":"OMG","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-11","time":"15:00","week":"星期六","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/02/ChFGUlexh1SAK36_AAAg7UAxpoE421.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/02/Cj2sUld16I-AYTr5AABWXZef0As516.png"},{"bMatchId":5368,"bMatchName":"2017LCK春季赛","teamA":"KT","teamB":"SSG","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-11","time":"16:00","week":"星期六","matchTypeName":"2017LCK春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/00/ChFGUlesJBGASZftAAAqxluRk24766.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJYOATvwSAAAnwx3oXbE611.png"},{"bMatchId":5369,"bMatchName":"2017LCK春季赛","teamA":"ROX","teamB":"LZ","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-11","time":"19:00","week":"星期六","matchTypeName":"2017LCK春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0B/ChFGQ1h8ZJaAQ0WQAAA3Sf3aukI819.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/4D/ChFGUlh_QAuAEMbxAAAuKdwZP3o528.png"},{"bMatchId":5382,"bMatchName":"2017LPL春季赛","teamA":"EDG","teamB":"NB","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-12","time":"13:00","week":"星期日","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4P5eAT3N8AABnoopFvhE024.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0E/ChFGQ1h_QT6ATGzOAAAmgQQ4hlo367.png"},{"bMatchId":5379,"bMatchName":"2017LPL春季赛","teamA":"VG","teamB":"GT","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-12","time":"15:00","week":"星期日","matchTypeName":"2017LPL春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0E/ChFGQ1h_QXOAa2CzAAAnW7sFuos962.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/Cj2sUld145iAemZ1AACG5iQNKGE975.png"},{"bMatchId":5378,"bMatchName":"2017LCK春季赛","teamA":"SKT","teamB":"BBQ","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-12","time":"16:00","week":"星期日","matchTypeName":"2017LCK春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/02/Cj2sUld15QOANA6sAABSVySTRdg914.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/0C/ChFGQ1h8ZuqAOx2sAAJB_6dwuK4141.png"},{"bMatchId":5383,"bMatchName":"2017LCK春季赛","teamA":"JAG","teamB":"MVP","scoreA":null,"scoreB":null,"bo":null,"matchDetailId":null,"date":"2017-02-12","time":"19:05","week":"星期日","matchTypeName":"2017LCK春季赛","teamAlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJJ6AFtnuAAAvuiXV7Ew824.png","teamBlogo":"http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJfaANFvdAAAw8eQfAws008.png"}],"page":{"pageIndex":1,"pageSize":7,"totalCount":4,"pageCount":1,"empty":false,"firstResult":0,"hasPrevious":false,"hasNext":false}}}
      )
  } else {
      res.json(
          {
              "code": 200,
              "data": {
                  "dataList": [
                      {
                          "bMatchId": 5366,
                          "bMatchName": "2017LCK春季赛",
                          "teamA": "MVP",
                          "teamB": "KDM",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-29",
                          "time": "16:00",
                          "week": "星期四",
                          "matchTypeName": "2017LCK春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJfaANFvdAAAw8eQfAws008.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0B/ChFGQ1h8ZLiAWMEYAAAkhKDDGv8680.png"
                      },
                      {
                          "bMatchId": 5325,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "IM",
                          "teamB": "SS",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-29",
                          "time": "17:00",
                          "week": "星期四",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/02/ChFGUlexh1SAK36_AAAg7UAxpoE421.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/09/ChFGQ1hy-aqAesE9AACMs5ClYik056.png"
                      },
                      {
                          "bMatchId": 5365,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "EDG",
                          "teamB": "GT",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-20",
                          "time": "17:00",
                          "week": "星期五",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4P5eAT3N8AABnoopFvhE024.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/Cj2sUld145iAemZ1AACG5iQNKGE975.png"
                      },
                      {
                          "bMatchId": 5380,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "RNG",
                          "teamB": "SS",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-21",
                          "time": "13:00",
                          "week": "星期六",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4OQmAHfvsAAATQgJwbYM768.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/09/ChFGQ1hy-aqAesE9AACMs5ClYik056.png"
                      },
                      {
                          "bMatchId": 5381,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "IM",
                          "teamB": "OMG",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-21",
                          "time": "15:00",
                          "week": "星期六",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/02/ChFGUlexh1SAK36_AAAg7UAxpoE421.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/02/Cj2sUld16I-AYTr5AABWXZef0As516.png"
                      },
                      {
                          "bMatchId": 5368,
                          "bMatchName": "2017LCK春季赛",
                          "teamA": "KT",
                          "teamB": "SSG",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-21",
                          "time": "16:00",
                          "week": "星期六",
                          "matchTypeName": "2017LCK春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/00/ChFGUlesJBGASZftAAAqxluRk24766.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJYOATvwSAAAnwx3oXbE611.png"
                      },
                      {
                          "bMatchId": 5369,
                          "bMatchName": "2017LCK春季赛",
                          "teamA": "ROX",
                          "teamB": "LZ",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-11",
                          "time": "19:00",
                          "week": "星期六",
                          "matchTypeName": "2017LCK春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0B/ChFGQ1h8ZJaAQ0WQAAA3Sf3aukI819.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/4D/ChFGUlh_QAuAEMbxAAAuKdwZP3o528.png"
                      },
                      {
                          "bMatchId": 5382,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "EDG",
                          "teamB": "NB",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-22",
                          "time": "13:00",
                          "week": "星期日",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0A/ChFGQ1h4P5eAT3N8AABnoopFvhE024.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0E/ChFGQ1h_QT6ATGzOAAAmgQQ4hlo367.png"
                      },
                      {
                          "bMatchId": 5379,
                          "bMatchName": "2017LPL春季赛",
                          "teamA": "VG",
                          "teamB": "GT",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-22",
                          "time": "15:00",
                          "week": "星期日",
                          "matchTypeName": "2017LPL春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0E/ChFGQ1h_QXOAa2CzAAAnW7sFuos962.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/Cj2sUld145iAemZ1AACG5iQNKGE975.png"
                      },
                      {
                          "bMatchId": 5378,
                          "bMatchName": "2017LCK春季赛",
                          "teamA": "SKT",
                          "teamB": "BBQ",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-22",
                          "time": "16:00",
                          "week": "星期日",
                          "matchTypeName": "2017LCK春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/02/Cj2sUld15QOANA6sAABSVySTRdg914.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/0C/ChFGQ1h8ZuqAOx2sAAJB_6dwuK4141.png"
                      },
                      {
                          "bMatchId": 5383,
                          "bMatchName": "2017LCK春季赛",
                          "teamA": "JAG",
                          "teamB": "MVP",
                          "scoreA": null,
                          "scoreB": null,
                          "bo": null,
                          "matchDetailId": null,
                          "date": "2017-02-22",
                          "time": "19:05",
                          "week": "星期日",
                          "matchTypeName": "2017LCK春季赛",
                          "teamAlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJJ6AFtnuAAAvuiXV7Ew824.png",
                          "teamBlogo": "http://game.fdfs.13322.com:80/group1/M00/00/01/ChFGUlesJfaANFvdAAAw8eQfAws008.png"
                      }
                  ],
                  "page": {
                      "pageIndex": 1,
                      "pageSize": 7,
                      "totalCount": 4,
                      "pageCount": 1,
                      "empty": false,
                      "firstResult": 0,
                      "hasPrevious": false,
                      "hasNext": false
                  }
              }
          }
      )
  }

})


module.exports = router;
